<?php
namespace app\superadmin\controller;
use app\superadmin\model\Index as IndexModel;
//继承Base控制器
class User extends Base
{
    public function userlist()
    {
        //获取用户列表并进行分页
        $usersres= \think\Db::name('users')->paginate(3);
        $this->assign('usersres',$usersres);
        //var_dump($usersres);die;
      return $this->fetch();
    }


     public function deluser(){
      $id=input('id');
      if(db('users')->delete($id)){
        return $this->success('删除成功！','userlist');
      }else{
        return $this->error('删除成功！','userlist');
      }
    }


   

}
